/****************************************************************************************
*                                                                                      *
*                          Projeto BioInfo - Lincs and CIn / UFPE                      *
*                                    07/10/2014                                        *
*																					   *
****************************************************************************************
* Descricao: Arquivo que contem main da classe bioaplication_sw.                    *
****************************************************************************************
* Responsaveis: Jefferson Ramos (jrla)													   *
*                                                                                      */
/*                                                                                     *
****************************************************************************************/

#include <bioaplication_sw.h>


int main( int argc, char **argv ){

	int NUM_THREADS = 10;
	int TAMSEQ = 240;
	int alignment_by_individuals = 15;
	int num_individuals = 2500;
	int query_compare = 1;
	int run_times = 1;
	int use_gpu = 1;

	//if (argc == 7)
	//{
	//	NUM_THREADS = atoi(argv[1]);
	//	TAMSEQ = atoi(argv[2]);
	//	alignment_by_individuals = atoi(argv[3]);
	//	num_individuals = atoi(argv[4]);
	//	query_compare = atoi(argv[5]);
	//	run_time = atoi(argv[6]);
	//}
	//else{
	//	printf("Usage: %s Default\n", argv[0]);
	//	exit(0);
	//}

	bioaplication_sw *bioinfo = NULL;

	try{

		bioinfo = new bioaplication_sw(
										NUM_THREADS,
										TAMSEQ,
										alignment_by_individuals,
										num_individuals,
										query_compare,
										run_times,
										use_gpu
										);

	}
	catch ( std::exception e ){
		printf("Failed to initialize bioinfo \n");
		printf("\n\nPress ENTER to exit...");
		fflush(stdin);
		getchar();
		exit(-1);
	}
	catch ( ... )
	{
		printf("Failed to initialize bioinfo \n");
		printf("\n\nPress ENTER to exit...");
		fflush(stdin);
		getchar();
		exit(-1);
	}

	bioinfo->executar();//executando algoritmos

	return 0;
}